package com.zzuli.yxy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzuli.yxy.entity.Employee;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @auther pony
 * @create 2023-03-05 14:41
 */
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {
    /**
     * 根据员工 id 查询员工所具有的角色名称
     * @param employeeId
     * @return
     */
    List<String> selectByEmployeeId(Integer employeeId);

    /**
     * 为 员工添加角色
     * @param employeeId 待添加的员工id
     * @param roleId 添加的角色id数组
     * @return
     */
    Integer addRoleForEmployee(Integer employeeId, Integer roleId);

    /**
     * 删除指定员工的角色信息
     * @param employeeId
     * @return
     */
    Integer deleteRoleByEmployeeId(Integer employeeId);


}
